package com.zhmsky.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhmsky.VO.InstockInfoVO;
import com.zhmsky.entity.InStockInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author zhmsky
 * @date 2021/12/9 16:51
 */
@Mapper
public interface InstockInfoMapper extends BaseMapper<InStockInfo> {
      @Select("select s.address,s.name,s.contact,s.phone,p.p_name,p.p_num,p.model,p.unit,is1.product_number " +
              "from in_stock_info isi, product p, in_stock is1, supplier s " +
              "where is1.in_num=isi.in_num and isi.p_num=p.p_num and is1.supplier_id=s.id")
      List<InstockInfoVO> getInstockInfo();
}
